package com.port.eleport.model.plat;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.port.eleport.model.base.IdEntity;

/**
 * 调拨明细
 * @author jameschen
 *
 */
@Entity
@Table(name = "plat_allot", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TAllot extends IdEntity{
	
	
	/**
	 * 出货议价
	 */
	@Column(name="clear_price")
	private BigDecimal clearPrice;
	/**
	 * 进货议价
	 */
	@Column(name="stock_price")
	private BigDecimal stockPrice;
	/**
	 * 调拨时间
	 */
	@Column(name="clear_store_date")
	private Date clearStoreDate;

	/**
	 * 调拨类型(1:逻辑调拨（仓库内调拨 商家内调拨 不影响库存）2：物理调拨（仓库间调拨 影响库存）)
	 */
	@Column(name="allot_type")
	private String allotType;
	
	/**
	 * 调拨的商品
	 */
	@ManyToOne
	@JoinColumn(name = "product_id")
	private TProduct product;
	
	/**
	 * 出货方
	 */
	@ManyToOne
	@JoinColumn(name = "clear_Merchant_id")
	private TMerchant clear;
	
	/**
	 * 进货方
	 */
	@ManyToOne
	@JoinColumn(name = "stock_Merchant_id")
	private TMerchant stock;
	
	/**
	 * 出货仓库
	 */
	@ManyToOne
	@JoinColumn(name = "clear_entrepot_id")
	private TEntrepot clearEntr;

	/**
	 * 进货仓库
	 */
	@ManyToOne
	@JoinColumn(name = "stock_entrepot_id")
	private TEntrepot stockEntr;

	public BigDecimal getClearPrice() {
		return clearPrice;
	}

	public void setClearPrice(BigDecimal clearPrice) {
		this.clearPrice = clearPrice;
	}

	public BigDecimal getStockPrice() {
		return stockPrice;
	}

	public void setStockPrice(BigDecimal stockPrice) {
		this.stockPrice = stockPrice;
	}

	public Date getClearStoreDate() {
		return clearStoreDate;
	}

	public void setClearStoreDate(Date clearStoreDate) {
		this.clearStoreDate = clearStoreDate;
	}

	public String getAllotType() {
		return allotType;
	}

	public void setAllotType(String allotType) {
		this.allotType = allotType;
	}

	public TProduct getProduct() {
		return product;
	}

	public void setProduct(TProduct product) {
		this.product = product;
	}

	public TMerchant getClear() {
		return clear;
	}

	public void setClear(TMerchant clear) {
		this.clear = clear;
	}

	public TMerchant getStock() {
		return stock;
	}

	public void setStock(TMerchant stock) {
		this.stock = stock;
	}

	public TEntrepot getClearEntr() {
		return clearEntr;
	}

	public void setClearEntr(TEntrepot clearEntr) {
		this.clearEntr = clearEntr;
	}

	public TEntrepot getStockEntr() {
		return stockEntr;
	}

	public void setStockEntr(TEntrepot stockEntr) {
		this.stockEntr = stockEntr;
	}
	

		
}
